import java.util.Scanner;

/**
 * Created with Interllij IDEA.
 * Descriptiption:
 * User: wch
 * Date: 2022-03-26
 * Time: 22:23
 */
public class SceondDemo {
    public static void main10(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        int t = 0;
        for (t = 31; t >= 1  ; t--) {
            System.out.print((i >> t) & 1);
        }
        System.out.println();
        for (t = 30; t >= 1  ; t--) {
            System.out.print((i >> t) & 1);
        }
    }
    public static void main9(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入一个整数");
        int i = 0;
        int a = scanner.nextInt();
        while (a != 0) {
            ++i;
            a = (a - 1) & a;
        }
        System.out.println(i);
    }



    public static void main8(String[] args) {
        String Keynumber = "haohaoxuexi";
        System.out.println("你有三次输入密码机会！");
        int t = 3;
        while (t>=1){
            System.out.println("请输入11位密码！");
            Scanner number = new Scanner(System.in);
            String r = number.nextLine();
            if(r == Keynumber){
                System.out.println("登入成功!");
                break;
            }else{
                System.out.println("密码错误，请重新输入!");
                System.out.println("你还有"+(t-1)+"次机会!");
                System.out.println("");
            }
            t--;
        }

    }


    public static void main7(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入两个整数；");
        int t = 1;
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        if(a == 0 || b == 0) {
            System.out.print(a == 0 ? b : a);
        }
        for (int i = 1; i <= a && i <= b; i++) {
            if(a%i == 0 & b%i == 0){
               t = i;
            }
        }
        System.out.println(t);
    }
    public static void main6(String[] args) {
        int a = 1,b = 1,c = 1;
        int sum = 0;
        int i = 100;
        for (; i <= 999; i++) {
            a = i/100;
            b = i%100/10;
            c = i%10;
            if(i == (a*a*a+b*b*b+c*c*c)){
                System.out.println(i);
            }
        }
    }
    public static void main5(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入你年龄");
        int age = scanner.nextInt();
        if(age<=18){
            System.out.println("少年！");
        }
        else if(age>=19 && age<=28){
            System.out.println("青年！");
        }
        else if(age>=29 && age<=55){
            System.out.println("中老!");
        }
        else{
            System.out.println("老年!");
        }
    }
    public static void main4(String[] args) {
        int year = 1000;
        for (; year <= 200; year++) {
            if (year % 100 == 0 && year % 400 == 0 || year % 4 == 0) {
                System.out.println(year);
            }
        }
    }


    public static void main3(String[] args) {
        for (int i = 1; i <= 100; i+=2) {
            int a = 2;
            while(i%a != 0){
                a++;
            }
            if(a == i){
                System.out.print(i);
            }

        }
    }
    public static void main2(String[] args) {
        Scanner c = new Scanner(System.in);
        System.out.println("请输入一个数：");
        int b = c.nextInt();
        int i = 2;
        for (i = 2; i < b ; i++) {
            if( b % i == 0){
                System.out.println("不是素数！");
                break;
            }
           }
        if(i == b){
            System.out.println("这是一个素数！");
        }
    }
    public static void main1(String[] args){
        int i = 1;
        for (int n = 1; n <=9 ; n++) {
            for (i = 1; i <=n ; i++) {
                System.out.printf(i+"*"+n+"="+(i*n)+"\t");
            }
            System.out.println();
        }
    }
}
